package com.woniu.service.potentialcustomercommand;

import com.woniu.adapter.PotentialCustomerAdapter;
import com.woniu.outlet.po.PotentialCustomers;
import com.woniu.service.Command;
import com.woniu.util.ApplicationContextHolder;

public class UpdatePotentialCustomer implements Command<PotentialCustomers,Integer> {

    private PotentialCustomerAdapter potentialCustomerAdapter;

    public UpdatePotentialCustomer(){
        this.potentialCustomerAdapter= ApplicationContextHolder.getApplicatonContext().getBean(PotentialCustomerAdapter.class);
    }

    @Override
    public Integer execute(PotentialCustomers potentialCustomers) {
        int i = potentialCustomerAdapter.updatePotentialCustomer(potentialCustomers);
        return i;
    }
}
